home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / BLOBS.ZIP / TABLES.BAS < prev    next >
BASIC Source File  |  1996-04-02  |  1KB  |  34 lines

  1. '*****************************************************************************
  2. '*                                                                           *
  3. '* Program to write out the tables needed for wobbler.asm                    *
  4. '* By TH/20/3/96                                                             *
  5. '*                                                                           *
  6. '*****************************************************************************
  7.  
  8. PRINT "Writing out variables"
  9. DIM n AS INTEGER
  10. deg2rad = 3.141592654# / 180
  11. HTable = FREEFILE
  12. OPEN "HTable.inc" FOR OUTPUT AS HTable
  13. PRINT "Writing htable..."
  14. PRINT #HTable, "HTable LABEL WORD"
  15. FOR n = 0 TO 199
  16.         PRINT #HTable, "DW", INT(SIN(n * (360 / 200) * deg2rad * 2) * 10)
  17. NEXT
  18. PRINT #HTable, "DW", "?"
  19. CLOSE HTable
  20.  
  21. VTable = FREEFILE
  22. OPEN "VTable.inc" FOR OUTPUT AS VTable
  23. PRINT "Writing vtable..."
  24. PRINT #VTable, "VTable LABEL WORD"
  25. FOR n = 0 TO 319
  26.         PRINT #VTable, "DW", INT(COS(n * (360 / 320) * deg2rad * 2) * 10)
  27. NEXT
  28. PRINT #VTable, "DW", "?"
  29. CLOSE #VTable
  30.  
  31.  
  32. PRINT "All done"
  33.  
  34.